<template>
  <div class="recommend">
    <!-- 就一个地方用到,所以没必要用插槽 -->
    <div v-for="item in recommends" :key="item.id" class="recommend-item">
      <a :href="item.link">
        <img :src="item.image" />
        <div>{{ item.title }}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    recommends: {
      type: Array,
      default: [],
    },
  },
};
</script>

<style>
.recommend {
  display: flex;
  justify-content: space-around;
  font-size: 12px;
  text-align: center;
  border-bottom: 8px solid #efefef;
}

.recommend-item {
  padding: 10px 0px 30px 0;
}
.recommend-item img {
  height: 70px;
  margin-bottom: 5px;
}
</style>